// 导入数据库操作模块
const db = require('../db/index')
exports.deleteInterest = (req,res)=>{  
    let forumname=req.body.forumname; 
    // let forumname = 'Nefertari' 
    const sqlStr = 'delete from interest where forumname = ?';
    db.query(sqlStr,forumname,(err,results)=>{
        // 执行SQL语句失败
        if(err) return res.send(err)
        // 调用res.send将信息响应给客户端
        res.send({
            status:200,
            message:'取消关注成功',
            results:results
        })
    })
}